#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n, i, j;
	cin>>n>>i>>j;
	
	for(int k=1;k<=n;++k)
		cout<<"("<<i<<","<<k<<")"<<" ";
	cout<<"\n";
	
	for(int k=1;k<=n;++k)
		cout<<"("<<k<<","<<j<<")"<<" ";
	cout<<"\n";
	
	for(int h=1;h<=n;++h)
		for(int l=1;l<=n;++l)
			if(l-h == j-i)
				cout<<"("<<h<<","<<l<<")"<<" ";
	cout<<"\n";
	
	for(int h=n;h>=1;--h)
		for(int l=1;l<=n;++l)
			if(l+h == j+i)
				cout<<"("<<h<<","<<l<<")"<<" ";
	cout<<"\n";
	return 0;
}
